#include "creature.h"
#include "monde.h"

#include <QtCore/QDebug>

Monde::Monde() {
    m_tourAct = 0;
    m_nbTours = 0;
}

Monde::Monde(int pIncParMut, int pNbTours) {
    m_tourAct = 0;
    m_nbTours = pNbTours;
    m_incParMut = pIncParMut;
}


void Monde::tour() {
    m_tourAct++;
    for (int i = 0; i < m_listeCreatures.size(); i++) {
        m_listeCreatures.at(i)->tour();
    }
}

Creature* Monde::ajouterCreature(int pAgeMax) {
    Creature* c = new Creature(this);
    c->m_ageMax = pAgeMax;
    m_listeCreatures.append(c);

    return c;
}
